<template>
    <div class="home">
        <leftnavs @sent-listnum="getlistnum"></leftnavs>
        
        <div class="right" :style="{ transform: `translateX(${moveX}px)`}">
            <div class="righttop">
                <el-breadcrumb separator-class="el-icon-arrow-right">
                    <el-breadcrumb-item :to="{ path: '/' }">当前位置</el-breadcrumb-item>
                    <el-breadcrumb-item>首页</el-breadcrumb-item>
                    
                </el-breadcrumb>
                <div class="top-rightbox">
                    <div>
                        <img src="../assets/topone.svg" alt="">
                        <span>提醒</span>
                    </div>
                    <div>
                        <img src="../assets/toptwo.svg" alt="">
                        <span>帮助</span>
                    </div>
                </div>
            </div>
            <div class="rightlist">
               
                <Searchbox></Searchbox>
                
                <div class="midlinebox"></div>
                <div class="shoplist">
                   <ul class="listul">
                        <li class="listli">
                            <div class="litop">
                                <div class="litopone">  
                                    <!-- 以下数据由后端返回，应该渲染到页面上 -->
                                    <p>订单号<span>2434354535446</span></p>
                                    <p>支付流水号<span>557822434354535446</span></p>
                                </div>
                                <div class="litoptwo">
                                    <p>支付方单号<span>557822434354535446</span></p>
                                    <p>支付方式<span>微信支付</span></p>
                                </div>
                                <div class="litopthree">
                                    <p>订单渠道<span>微信小程序/</span></p>
                                    <p>备注<span>无</span></p>
                                </div>
                                <div class="litopfour">
                                    <p>查看详情</p>
                                </div>
                            </div>
                            <div class="libottom">
                                <div class="libottomleft">
                                    <div class="ordershop">
                                        <!-- ordershop  应该为渲染得到   使用v-for-->
                                       <div class="leftphotobox">
                                            <img class="ordershopimg" src="https://preview.axure6.com/091/images/%E5%95%86%E5%93%81%E5%BA%93/u536.png" alt="">
                                            <p class="ordershopname">mini香蕉</p>
                                       </div>
                                        <div>
                                            <p class="price">￥19.9</p>
                                            <p class="num">(2件)</p>
                                        </div>
                                    </div>
                                    <div class="ordershop">
                                       <div class="leftphotobox">
                                            <img class="ordershopimg" src="https://preview.axure6.com/091/images/%E5%95%86%E5%93%81%E5%BA%93/u536.png" alt="">
                                            <p class="ordershopname">mini香蕉</p>
                                       </div>
                                        <div>
                                            <p class="price">￥19.9</p>
                                            <p class="num">(2件)</p>
                                        </div>
                                    </div>
                                    <div class="ordershop">
                                       <div class="leftphotobox">
                                            <img class="ordershopimg" src="https://preview.axure6.com/091/images/%E5%95%86%E5%93%81%E5%BA%93/u536.png" alt="">
                                            <p class="ordershopname">mini香蕉</p>
                                       </div>
                                        <div>
                                            <p class="price">￥19.9</p>
                                            <p class="num">(2件)</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="libottomright">
                                    <div>--</div>
                                    <div>
                                        <p>收货人联系方式</p>
                                        <p>100000023323</p>
                                    </div>
                                    <div>
                                        <p>2023-03-13   14:34:36</p>
                                    </div>
                                    <div>
                                        <p>订单状态</p>
                                        <p>发货</p>
                                    </div>
                                    <div>
                                        <p>支付金额</p>
                                    </div>
                                </div>
                            </div>
                        </li>
                   </ul>
                </div>
                
            </div>
            
        </div>
        
    </div>
    </template>
    
    <script>
    // @ is an alias to /src
    import HelloWorld from '@/components/HelloWorld.vue'
    import Small from '@/components/Small.vue'
    import Searchbox from '@/components/Searchbox.vue'
    import * as echarts from 'echarts'
import Leftnavs from '../components/Leftnavs.vue'

    export default {
      name: 'HomeView',
      
      components: {
        HelloWorld,
        Small,
        Leftnavs,
        Searchbox,
      },
      data(){
        return{
            chart:null,
            listnum:0,
            value: '',
            checknum:-1,
            currentPage4: 4,
          
            tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }],
        multipleSelection: [],
            options: [{
                value: '选项1',
                label: '蔬菜'
                }, {
                value: '选项2',
                label: '水果'
                },],
                value: '',
                dates: [{
                value: '选项1',
                label: '正常'
                }, {
                value: '选项2',
                label: '淘汰'
                },],
        }
      },
    
      methods:{
        handleSelectionChange() {
            this.multipleSelection = this.$refs.multipleTable.selection;
        },
        getlistnum(i){
            this.listnum=i
        },
        dellistnum(){
            this.listnum=0
        },
        gonext(data){
            if(this.$route.name!=data){
				this.$router.push({name:data})
				
			}else{
				console.log('出错了');
				
			}
        },
		rehome(){
			if(this.$route.name!='home'){
				this.$router.push({name:'home'})
				
			}else{
				console.log('已经在主页了');
				
			}
  		},
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
        },
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`);
        },
        getdata(i){
            console.log(i);
            
            this.checknum=i
        },
      },
      computed: {
        moveX() {
          return this.listnum >= 1 ? 115 : 0;
        },
      },
      
    
    }
    </script>
    <style scoped>
    *{
        padding: 0;
        margin: 0;
    }
    li{
        cursor: pointer;
    }
    .left{
        height: auto;
        width: 98px;
        background-color: rgb(0, 21, 41);	
    }
    ul{
        list-style: none;
        
    }
    .myphoto img{
        width: 48px;
        height: 48px;
        border-radius: 50%;
    }
    .myphoto{
        padding: 18px;
    }
    li img{
        height: 18px;
        margin-left: 13px;
        width: auto;
    }
    .right{
        transition:  all .8s;
    }
    .othersvg{
        width: 18px !important;
        height: auto;
    }
    li{
        display: flex;
        align-items: center;
        height: 44px;
    }
    
    li span{
        display: block;
        float: right;
        margin-left: 20px;
        font-size: 13px;
        color: rgb(228, 228, 228);
        font-weight: 400;
    }
    .morewith{
        padding-right: 2.5px;
        padding-left: 2.5px;
    }
    .righttop{
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 1260px;
        height: 36px;
        background-color: rgb(255, 255, 255);
        border: none;
        border-radius: 0px;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 0px 5px;
    }
    .home{
        display: flex;
        margin: 0 auto;
        width: 1360px;
        margin: 0 auto;
    }
    .el-breadcrumb{
        margin-left: 10px;
    }
    .top-rightbox{
        
        color: #555;
        display: flex;
        align-items: center;
    }
    .top-rightbox div{
        font-size: 14px;
        margin-right: 15px;
        color: #555;
        display: flex;
        align-items: center;
    }
    .top-rightbox div img{
        margin-right: 5px;
    }
    .botonebox{
        display: flex;
    }

    .botline{
        width: 1227px;
        height: 429px;
        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        border-radius: 0px;
        margin-left: 35px;
        margin-top: 20px;
    }
    .classify{
        z-index: 99;
        position: absolute;
        left: 142px;
        top: 0;
        width: 114px;
        height: 823px;
        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        border-radius: 0px;
    }
    .shopreturn img{
        margin-left: 20px;
    }
    .shopreturn{
        height: 38px;
        line-height: 38px;
        border-bottom:1.5px solid #cfcfcf;
        font-size: 13px;
    } 
    .shopul li{
        padding-left: 19px;
        font-size: 13px;
    }
    .shopul{
        margin-top: 5px;
    }

    .addshop{
        width: 91px;
        height: 30px;
        background: inherit;
        background-color: rgba(0, 153, 255, 1);
        border: none;
        border-radius: 2px;
        font-weight: 400;
        font-style: normal;
        font-size: 12px;
        color: #fff;
    }
    .addshop span{
        line-height: 30px;
    }
    .rightlist{
        margin-left: 10px;
        margin-top: 13px;
        background-color: #fff;
        padding: 20px 10px 0 18px;
    }
    .searchlist{
        background-color: #f4f9fa;
        width: 1220px;
        margin-top: 16px;
        height: 192px;
        display: flex;
        align-items: center;
    }
    .searchone{
        display: flex;
        align-items: center;
    }
    .shopnamebox{
        padding: 5px 7px;
        border: 1px solid #555;
        background-color: #fff;
    }
    .shopnamebox input{
        border: none;
        outline: none;
    }
    .searchtwo{
        display: flex;
        align-items: center;
    }
    .searchthree{
        display: flex;
        align-items: center;
    }
    .searchfour{
        display: flex;
        align-items: center;
    }
    .searchbutton{
        width: 80px;
        height: 30px;
        background: inherit;
        background-color: rgba(0, 153, 255, 1);
        border: none;
        border-radius: 2px;
        font-weight: 400;
        font-style: normal;
        font-size: 13px;
        display: flex;
        align-items: center;
        color: #fff;
        margin-left: 64px;
    }
    .searchbutton img{
        width: 13px;
        height: 13px;
        margin-left: 16px;
        margin-right: 8px;
    }
    .searchsmallbox{
        width: 900px;
        display: flex;
       
        flex-wrap: wrap;
    }
    .midclassify{

        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        line-height: 30px;
        font-size: 13px;
        color: #222;
        text-align: center;
        display: flex;
        margin-top: 35px;
    }
    .midclassify div{
        width: 100px;
        height: 30px;
        cursor: pointer;
    }
    .midlinebox{
        width: 1222px;
        height: 1.3px;
        background-color: #c3c3c3;
        margin-bottom: 15px;
    }
    .midclassifyactive{
        color: #ffffff;
        background-color: #0079fe;
    }
    .midclassifyone{
        width: 100px;
        height: 30px;
        cursor: pointer;
        margin-right: 10px;
    }
    .midclassifyone:hover{
        color: #0079fe;
    }
    .litop{
        width: 100%;
        height: 100px;
        display: flex;
        justify-content: space-between;
        background: inherit;
        background-color: rgba(242, 242, 242, 1);
        box-sizing: border-box;
        border-width: 1px;
        border-style: solid;
        padding: 0 10px;
        border-color: rgba(204, 204, 204, 1);
        border-radius: 0px;
    }

    .litopone,.litoptwo,.litopthree,.litopfour{ 
        display: flex;
        flex-direction: column;

        justify-content: center;

    }
    .litopone p,.litoptwo p,.litopthree p,.litopfour p{
        height: 31px;
        text-align: left;
        font-size: 14px;
        display: flex;
        align-items: center;
    }
    .litopone p span,.litoptwo p span,.litopthree p span,.litopfour p span{
        color: #222;
        font-size: 14px;
    }
    .listli{
        display: flex;
        flex-direction: column;
    }
   
    .libottom{
        width: 100%;
        display: flex;
 

    }
    .ordershop{
        display: flex;
        padding-top: 8px;
        align-items: center;
        border-top: .8px solid #ccc;
    }
    .ordershop img{
        width: 77px;
        height: 55px;
        margin: 0;
    }
    .libottomright{
        display: flex;
        width: 65%;
        align-items: center;
        justify-content: space-around;
        border: 1px solid #ccc;
    }
    .libottomleft{
        padding: 0px 0 8px 8px;
        width: 35%;
        border: 1px solid #ccc;

    }
    .leftphotobox{
        display: flex;
    }
    .ordershopname{
        margin-left: 15px;
        text-align: left;
        width: 220px;
            display: -webkit-box;
            -webkit-line-clamp: 2; 
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis; 
            white-space: normal; 
    }
    </style>